package com.qaml.mes.device.enums;

import lombok.Getter;

@Getter
public enum DayOffType {


    WEEKEND(1, "周末"),

    statutory_holiday(2, "法定节假日"),
    OTHER(3, "其他"),
    ;

    private Integer code;

    private String message;

    DayOffType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMessageByCode(Integer code) {

        for (DayOffType value : DayOffType.values()) {
            if (value.code.equals(code)) {
                return value.message;
            }
        }
        return "";

    }
}
